package ca.llsutherland.nfl.helper;

import java.util.HashMap;
import java.util.Map;

import ca.llsutherland.nfl.domain.Division;
import ca.llsutherland.nfl.domain.Team;
import ca.llsutherland.nfl.util.Constants;

public class TeamHelper {

	
	private final static Map<String, Team> teamsMap = new HashMap<String, Team>();
	static {
		teamsMap.put(Constants.TEAM_ARIZONA, new Team(Constants.TEAM_ARIZONA, Constants.TEAM_ARIZONA_NICKNAME, Constants.TEAM_ARIZONA_SHORT_CITY, Constants.TEAM_ARIZONA_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_ATLANTA, new Team(Constants.TEAM_ATLANTA, Constants.TEAM_ATLANTA_NICKNAME, Constants.TEAM_ATLANTA_SHORT_CITY, Constants.TEAM_ATLANTA_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_BALTIMORE, new Team(Constants.TEAM_BALTIMORE, Constants.TEAM_BALTIMORE_NICKNAME, Constants.TEAM_BALTIMORE_SHORT_CITY, Constants.TEAM_BALTIMORE_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_BUFFALO, new Team(Constants.TEAM_BUFFALO, Constants.TEAM_BUFFALO_NICKNAME, Constants.TEAM_BUFFALO_SHORT_CITY, Constants.TEAM_BUFFALO_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_CAROLINA, new Team(Constants.TEAM_CAROLINA, Constants.TEAM_CAROLINA_NICKNAME, Constants.TEAM_CAROLINA_SHORT_CITY, Constants.TEAM_CAROLINA_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_CHICAGO, new Team(Constants.TEAM_CHICAGO, Constants.TEAM_CHICAGO_NICKNAME, Constants.TEAM_CHICAGO_SHORT_CITY, Constants.TEAM_CHICAGO_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_CINCINNATI, new Team(Constants.TEAM_CINCINNATI, Constants.TEAM_CINCINNATI_NICKNAME, Constants.TEAM_CINCINNATI_SHORT_CITY, Constants.TEAM_CINCINNATI_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_CLEVELAND, new Team(Constants.TEAM_CLEVELAND, Constants.TEAM_CLEVELAND_NICKNAME, Constants.TEAM_CLEVELAND_SHORT_CITY, Constants.TEAM_CLEVELAND_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_DALLAS, new Team(Constants.TEAM_DALLAS, Constants.TEAM_DALLAS_NICKNAME, Constants.TEAM_DALLAS_SHORT_CITY, Constants.TEAM_DALLAS_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_DENVER, new Team(Constants.TEAM_DENVER, Constants.TEAM_DENVER_NICKNAME, Constants.TEAM_DENVER_SHORT_CITY, Constants.TEAM_DENVER_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_DETROIT, new Team(Constants.TEAM_DETROIT, Constants.TEAM_DETROIT_NICKNAME, Constants.TEAM_DETROIT_SHORT_CITY, Constants.TEAM_DETROIT_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_GREEN_BAY, new Team(Constants.TEAM_GREEN_BAY, Constants.TEAM_GREEN_BAY_NICKNAME, Constants.TEAM_GREEN_BAY_SHORT_CITY, Constants.TEAM_GREEN_BAY_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_HOUSTON, new Team(Constants.TEAM_HOUSTON, Constants.TEAM_HOUSTON_NICKNAME, Constants.TEAM_HOUSTON_SHORT_CITY, Constants.TEAM_HOUSTON_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_INDIANAPOLIS, new Team(Constants.TEAM_INDIANAPOLIS, Constants.TEAM_INDIANAPOLIS_NICKNAME, Constants.TEAM_INDIANAPOLIS_SHORT_CITY, Constants.TEAM_INDIANAPOLIS_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_JACKSONVILLE, new Team(Constants.TEAM_JACKSONVILLE, Constants.TEAM_JACKSONVILLE_NICKNAME, Constants.TEAM_JACKSONVILLE_SHORT_CITY, Constants.TEAM_JACKSONVILLE_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_KANSAS_CITY, new Team(Constants.TEAM_KANSAS_CITY, Constants.TEAM_KANSAS_CITY_NICKNAME, Constants.TEAM_KANSAS_CITY_SHORT_CITY, Constants.TEAM_KANSAS_CITY_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_MIAMI, new Team(Constants.TEAM_MIAMI, Constants.TEAM_MIAMI_NICKNAME, Constants.TEAM_MIAMI_SHORT_CITY, Constants.TEAM_MIAMI_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_MINNESOTA, new Team(Constants.TEAM_MINNESOTA, Constants.TEAM_MINNESOTA_NICKNAME, Constants.TEAM_MINNESOTA_SHORT_CITY, Constants.TEAM_MINNESOTA_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_NEW_ENGLAND, new Team(Constants.TEAM_NEW_ENGLAND, Constants.TEAM_NEW_ENGLAND_NICKNAME, Constants.TEAM_NEW_ENGLAND_SHORT_CITY, Constants.TEAM_NEW_ENGLAND_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_NEW_ORLEANS, new Team(Constants.TEAM_NEW_ORLEANS, Constants.TEAM_NEW_ORLEANS_NICKNAME, Constants.TEAM_NEW_ORLEANS_SHORT_CITY, Constants.TEAM_NEW_ORLEANS_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_NY_GIANTS, new Team(Constants.TEAM_NY_GIANTS, Constants.TEAM_NY_GIANTS_NICKNAME, Constants.TEAM_NY_GIANTS_SHORT_CITY, Constants.TEAM_NY_GIANTS_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_NY_JETS, new Team(Constants.TEAM_NY_JETS, Constants.TEAM_NY_JETS_NICKNAME, Constants.TEAM_NY_JETS_SHORT_CITY, Constants.TEAM_NY_JETS_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_OAKLAND, new Team(Constants.TEAM_OAKLAND, Constants.TEAM_OAKLAND_NICKNAME, Constants.TEAM_OAKLAND_SHORT_CITY, Constants.TEAM_OAKLAND_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_PHILADELPHIA, new Team(Constants.TEAM_PHILADELPHIA, Constants.TEAM_PHILADELPHIA_NICKNAME, Constants.TEAM_PHILADELPHIA_SHORT_CITY, Constants.TEAM_PHILADELPHIA_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_PITTSBURGH, new Team(Constants.TEAM_PITTSBURGH, Constants.TEAM_PITTSBURGH_NICKNAME, Constants.TEAM_PITTSBURGH_SHORT_CITY, Constants.TEAM_PITTSBURGH_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_SAN_DIEGO, new Team(Constants.TEAM_SAN_DIEGO, Constants.TEAM_SAN_DIEGO_NICKNAME, Constants.TEAM_SAN_DIEGO_SHORT_CITY, Constants.TEAM_SAN_DIEGO_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_SAN_FRANCISCO, new Team(Constants.TEAM_SAN_FRANCISCO, Constants.TEAM_SAN_FRANCISCO_NICKNAME, Constants.TEAM_SAN_FRANCISCO_SHORT_CITY, Constants.TEAM_SAN_FRANCISCO_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_SEATTLE, new Team(Constants.TEAM_SEATTLE, Constants.TEAM_SEATTLE_NICKNAME, Constants.TEAM_SEATTLE_SHORT_CITY, Constants.TEAM_SEATTLE_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_ST_LOUIS, new Team(Constants.TEAM_ST_LOUIS, Constants.TEAM_ST_LOUIS_NICKNAME, Constants.TEAM_ST_LOUIS_SHORT_CITY, Constants.TEAM_ST_LOUIS_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_TAMPA_BAY, new Team(Constants.TEAM_TAMPA_BAY, Constants.TEAM_TAMPA_BAY_NICKNAME, Constants.TEAM_TAMPA_BAY_SHORT_CITY, Constants.TEAM_TAMPA_BAY_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_TENNESSEE, new Team(Constants.TEAM_TENNESSEE, Constants.TEAM_TENNESSEE_NICKNAME, Constants.TEAM_TENNESSEE_SHORT_CITY, Constants.TEAM_TENNESSEE_SHORT_NICKNAME));
		teamsMap.put(Constants.TEAM_WASHINGTON, new Team(Constants.TEAM_WASHINGTON, Constants.TEAM_WASHINGTON_NICKNAME, Constants.TEAM_WASHINGTON_SHORT_CITY, Constants.TEAM_WASHINGTON_SHORT_NICKNAME));
	};
	
	
	
	public static Team createNewTeam(String city, Division division) {
		Team team = teamsMap.get(city);
		team.setDivision(division);
		return team;
	}



	public static Team createTeam(Long id, String city, String nickname, String shortCity, String shortNickname, Division division) {
		Team team = new Team();
		team.setId(id);
		team.setCity(city);
		team.setNickname(nickname);
		team.setShortCity(shortCity);
		team.setShortNickname(shortNickname);
		team.setDivision(division);
		return team;
	}

}
